return {
    'nvim-tree/nvim-tree.lua',
    dependencies = {
        'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
    },
    opts = {},
    init = function()
        vim.g.loaded_netrw = 1
        vim.g.loaded_netrwPlug = 1
        -- 映射快捷键
        local api = require('nvim-tree.api')
        vim.keymap.set('n', '<leader>e', api.tree.toggle, {desc = '切换文件树显示'})
        -- 当只剩下 tree 窗口的时候，自动关闭
        vim.api.nvim_create_autocmd({'BufEnter'}, {
            nested = true,
            callback = function()
                -- 判定窗口数量
                if #vim.api.nvim_list_wins() == 1 and require("nvim-tree.utils").is_nvim_tree_buf() then
                    vim.cmd('quit')
                end
            end
        })
    end
}
